package com.study.design.pattern.pattern.creational.singleton.threadlocal;

import cn.hutool.core.thread.ThreadUtil;

/**
 * @Author: gongsl
 * @Date: 2025-02-23 16:22
 * @description:
 */
public class Test {
    public static void main(String[] args) {
        System.out.println(ThreadLocalInstance.getInstance());
        System.out.println(ThreadLocalInstance.getInstance());
        System.out.println(ThreadLocalInstance.getInstance());
        System.out.println(ThreadLocalInstance.getInstance());
        System.out.println(ThreadLocalInstance.getInstance());
        System.out.println(ThreadLocalInstance.getInstance());
        ThreadUtil.execute(() -> System.out.println(ThreadLocalInstance.getInstance()));
    }
}
